package com.shopping.pojo;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

public class Receive {

    int id;
    @Size(max = 8, min = 4)
    String receiveName;
    @Size(max = 100, min = 10)
    String receiveAddress;
    @Size(max = 6, min = 6)
    String postcode;
    @Size(max = 11, min = 11)
    String phone;
    @NotNull
    boolean isDefault;
    int userId;

    public void setId(int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    public String getReceiveName() {
        return receiveName;
    }

    public void setReceiveName(String receiveName) {
        this.receiveName = receiveName;
    }

    public String getReceiveAddress() {
        return receiveAddress;
    }

    public void setReceiveAddress(String receiveAddress) {
        this.receiveAddress = receiveAddress;
    }

    public String getPostcode() {
        return postcode;
    }

    public void setPostcode(String postcode) {
        this.postcode = postcode;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public boolean isDefault() {
        return isDefault;
    }

    public void setDefault(boolean aDefault) {
        isDefault = aDefault;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "ReceiveDao{" +
                "id=" + id +
                ", receiveName='" + receiveName + '\'' +
                ", receiveAddress='" + receiveAddress + '\'' +
                ", postcode='" + postcode + '\'' +
                ", phone='" + phone + '\'' +
                ", isDefault=" + isDefault +
                ", userId=" + userId +
                '}';
    }
}
